<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="mainMenu" />
<meta name="nav" content="0" />
<meta name="acc" content="2" />
<title>单位管理</title>
<script type="text/javascript"
	src="<c:url value='/ext/ui/jquery-ui-1.8.12.custom.min.js'/>"></script>
<link href="${ctx}/styles/lightness/jquery-ui-1.8.12.custom.css"
	rel="stylesheet" />
<script type="text/javascript">
	$(document).ready(
					function() {
						$("#orgName").focus();

						$("#finishDate").addClass("Wate").bind("focus",
								function() {
									WdatePicker({
										skin : 'whyGreen',
										minDate : '1900-10-01',
										maxDate : '%y-%M-%d',
										dateFmt : 'yyyy-MM-dd'
									});
								});
						$("#checkDate").addClass("Wate").bind("focus",
								function() {
									WdatePicker({
										skin : 'whyGreen',
										minDate : '#F{$dp.$D(\'finishDate\')}',
										maxDate : '%y-%M-%d',
										dateFmt : 'yyyy-MM-dd'
									});
								});
						$("#backbtn").click(function(){
							window.location.href='${ctx}/account/inside_organization.action';
						});
						$("#inputForm").validate(
										{
											rules : {
												orgName : {
													required : true,
													remote : "${ctx}/account/inside_organization!checkOrgName.action?oldOrgName="
															+ encodeURIComponent('${orgName}')
												},
												orgTelephone : "required",
												orgAddress : "required",
												orgTelephone : "digits",
												postCode : "digits",
												orgHome : "url",
												email :{
													required:true,
													email:true
												} 
											},
											messages : {
												orgNum : {
													remote : "<font color='red'>机构代码证已存在</font>"
												}
											}
										});
					});
</script>
</head>
<body>
<form action="inside_organization!save.action" method="post"
	class="yform" id="inputForm"><input type="hidden" id="id"
	name="id" value="${id }">
<div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul
	class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all ui-sortable">
	<li><a id="construction" class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active  "
		href="account/user!input.action?id=${param.userId}&label=inside">内部单位</a></li>
	<c:if test="${fn:length(id)!=0}">
	<li><a id="construction" class="ui-state-default ui-corner-top  "
		href="${ctx}/account/department.action?organizationId=${id}">单位部门</a></li>
	</c:if>
</ul>
<table class="noborder">
	<tr class="type-text">
		<td>单位名称</td>
		<td colspan="3"><input type="text" id="orgName" name="orgName"
			value="${orgName }" /></td>
	</tr>
	<tr class="type-text">
		<td>上级单位</td>
		<td>
			<s:select name="organization.id" list="allInsideOrganizationList"  headerKey="" headerValue="顶层单位" listKey="id" listValue="orgName"></s:select>
		</td>
		<td>主管部门</td>
		<td><input type="text" id="burderDep" name="burderDep"
			value="${burderDep}" /></td>
	</tr>
	<tr class="type-text">
		<td>级&nbsp;&nbsp;别</td>
		<td><input type="text" id="orgLevel" name="orgLevel"
			value="${orgLevel }" /></td>
		<td>行政级别</td>
		<td><input type="text" id="politicsLevel" name="politicsLevel"
			value="${politicsLevel }"></td>
	</tr>
	<tr class="type-text">
		<td>成立时间</td>
		<td><input type="text" id="finishDate" name="finishDate"
			value="${finishDate }"></td>
		<td>考核时间</td>
		<td><input type="text" id="checkDate" name="checkDate"
			value="${checkDate }"></td>
	</tr>
	<tr class="type-text">
		<td>单位电话</td>
		<td><input type="text" id="orgTelephone" name="orgTelephone"
			value="${orgTelephone }" /></td>
		<td>传真</td>
		<td><input type="text" id="portraiture" name="portraiture"
			value="${portraiture }" /></td>
	</tr>
	<tr class="type-text">
		<td>电子邮箱</td>
		<td ><input type="text" id="email" name="email"
			value="${email }"></td>
		<td>邮政编码</td>
		<td ><input type="text" id="postCode" name="postCode"
			value="${postCode }" /></td>
	</tr>
	<tr class="type-text">
		<td>经费来源</td>
		<td ><input type="text" id="moneySource"
			name="moneySource" value="${moneySource }"></td>
			<td>机构代码证</td>
		<td><input type="text" id="orgNum" name="orgNum"
			value="${orgNum }" /></td>
	</tr>
	<tr class="type-text">
		<td>单位主页</td>
		<td colspan="3"><input type="text" id="orgHome" name="orgHome"
			value="${orgHome }"></td>
		</tr>
	<tr class="type-text">
			<td>单位地址</td>
			<td colspan="3"><input type="text" id="orgAddress"
			name="orgAddress" value="${orgAddress }"></td>
	</tr>
	<tr class="type-text">
		<td>单位职能</td>
		<td colspan="3"><textarea rows="3" cols="60" name="functionsOrg">${functionsOrg }</textarea></td>
	</tr>
	<tr class="type-text">
		<td>基本简况</td>
		<td colspan="3"><textarea rows="3" cols="60" id="basicInfo"
			name="basicInfo">${basicInfo }</textarea></td>
	</tr>
	<tr class="type-text">
		<td>备注</td>
		<td colspan="3"><textarea rows="3" cols="60" id="remark"
			name="remark">${remark }</textarea></td>
	</tr>
	<tr>
		<td colspan="4" align="center">
		<div class="type-button"><input   type="submit"
			class="submit" value="提交" />&nbsp; <input   id="backbtn"
			type="button" value="返回" class="reset" /></div>
		</td>
	</tr>
</table>
</div>
</form>
</body>
</html>